<?php
/*
 * Created on 11/11/2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 require("./config.php");
 require("./global/db.php");
 require("./global/functions.php");

 require("./global/template.php");
 setlocale(LC_CTYPE,"pt_BR");

 if ($con)
 	$id = mysql_select_db($dbname,$con);
 if (!$id) {
 	header("Location: INSTALL.php");
 	exit;
 }

 $sql = "SELECT * FROM eclass_config WHERE propriedade = 'INSTALLED'";
 $result = mysql_query($sql);
 $success = mysql_num_rows($result);

 if($success) {
	$row = mysql_fetch_array($result);
	if($row['valor'] != '1') {
		header ("Location: INSTALL.php");
 		exit;
	}
 } else {
 	header ("Location: INSTALL.php");
 	exit;
 }

 $stat = '';
 require("./global/session.php");
 $userdata = $user->getData();

 if($user->isLogged()) {
 	$stat = $userdata["nome"] . ' | <a href="'.$rootdir.'/Gerenciar.User.Fluxo_Editar.php">Editar Conta</a> | <a href="'.$rootdir.'/index.php?act=logout">Sair</a>';
 } else {
 	$header->delSection("status");
 }
 $header->assign ( array ("STAT" => $stat));

 error_reporting(1);

?>
